<?php 
require_once '../../config.php';
$css_arr = array(
	'css/orquesta/orquesta.css',
	'css/orquesta/perfil.css'
);
$js_arr = array();
require_once PATH . 'layout/header.php';
require_once PATH . 'classes/ofj-orm/OrquestaSubCategoria.php';
require_once PATH . 'classes/ofj-orm/OrquestaIntegrante.php';

$id = (int) $_GET['id'];

// Trae el perfil
$OrquestaIntegrante  =  OrquestaIntegrante::instance()->findById($id);
$bio = (LANG == 'en') ? $OrquestaIntegrante->bio_en : $OrquestaIntegrante->bio;

// Trae la subcategoria
$OrquestaSubCategoria =  OrquestaSubCategoria::instance()->findById($OrquestaIntegrante->orquesta_sub_categoria_id);
$cat = (LANG == 'en') ? $OrquestaSubCategoria->nombre : $OrquestaSubCategoria->nombre_en;
?>
<div class="clearfix">

    <!-- PERFIL -->
    <?php 
    	require_once '../sidebar_menu.php';
    	Lang::setSource('integrantes'); 
    ?>
    
    <section id="musicians_secction">
    	<?php require_once '../menu.php';?>
    	
    	<div id="perfil_cont">
    		<h2 id="name"><?php echo $OrquestaIntegrante->nombre , ' ', $OrquestaIntegrante->apellidos?></h2>
    		
    		<div class="clearfix">
    			<img src="<?php echo OrquestaIntegrante::getImageUrl($OrquestaIntegrante->id)?>" width="200" height="265" alt="<?php echo $OrquestaIntegrante->nombre ?>" title="<?php echo $OrquestaIntegrante->nombre ?>" id="perfil_img" />
    			<div id="categoria"><?php echo $cat?></div>
    			<div id="bio">
    				<?php echo $bio?>
    			</div> <!-- end of #bio -->
    		</div>
    	</div> <!-- end of #perfil_cont -->
    	
    	<div id="news_social_buttons" class="clearfix">
	      <div id="news_btn_gplus">
	        <g:plusone size="small"></g:plusone>
	        <div class="g-plus" data-action="share" data-annotation="none" data-height="15"></div>
	        <script type="text/javascript">
	          <?php if(LANG == 'es'): ?>
	          window.___gcfg = {lang: 'es'};
	          <?php endif ?>
	          (function() {
	            var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
	            po.src = 'https://apis.google.com/js/plusone.js';
	            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
	          })();
	        </script>
	      </div>
	      <div id="news_btn_facebook">
	        <div class="fb-like"
	          data-href="<?php echo BASE, 'orquesta/perfil/?id=' , $OrquestaIntegrante->id ?>"
	          data-send="true"
	          data-width="200"
	          data-layout="button_count"
	          data-show-faces="false"></div>
	        <div id="fb-root"></div>
	        <script>(function(d, s, id) {
	          var js, fjs = d.getElementsByTagName(s)[0];
	          if (d.getElementById(id)) return;
	          js = d.createElement(s); js.id = id;
	          <?php if(LANG == 'es'): ?>
	          js.src = "//connect.facebook.net/es_LA/all.js#xfbml=1";
	          <?php else: ?>
	          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
	          <?php endif ?>
	          fjs.parentNode.insertBefore(js, fjs);
	        }(document, 'script', 'facebook-jssdk'));</script>
	      </div>
      </div> <!-- end of #news_social_buttons -->
    	
    </section> <!-- End of #musicians_secction -->
    <!-- PERFIL -->
    
</div><!-- end of .clearfix -->
<?php 
require_once PATH . 'layout/footer.php';
?>